package com.xxc.exam.entity

import com.xxc.common.anotation.POKO
import java.io.Serializable
import java.math.BigInteger
import java.sql.Timestamp

@POKO
data class CategoryEntity  (var id: BigInteger? = null, var name:String?=null,
                           var owner:ManagerEntity? = null,
                           var children:MutableList<CategoryEntity>? = null,
                           var gmtCreate: Timestamp? = null,
                           var parent:CategoryEntity? = null,
                           var gmtModified: Timestamp? = null) : Serializable{
    companion object{
        fun DEFAULT(owner:BigInteger):CategoryEntity
        {
            return CategoryEntity(name = "默认",owner = ManagerEntity(id = owner))
        }
    }
}